
import { request } from '@/api/service'
export const crudOptions = (vm) => {
  return {
    pageOptions: {
      compact: true
    },
    options: {
      tableType: 'vxe-table',
      rowKey: false,
      width: '100%',
      height: '100%' // 表格高度100%, 使用toolbar必须设置
    },
    rowHandle: {
      width: 240,
      fixed: 'right',
      view: {
        thin: true,
        text: '',
      },
      edit: {
        thin: true,
        text: '',
      },
      remove: {
        thin: true,
        text: '',
        // disabled :true,
        // show: false,
      },
    },
    viewOptions: {
      // disabled: true,
      componentType: 'form'
    },
    formOptions: {
      type: 'drawer',
      size: '80%',
      saveRemind: true,
      defaultSpan: 24 // 默认的表单 span
    },
    columns: [
      
      {
        title: 'ID',
        key: 'id',
        show: false,
        width: 90,
        form: {
          disabled: true
        }
      },
     
     
    {
      title: '项目名称',
      key: 'projectName',
      sortable: true,
      show: true,
      search: {
        disabled: false,
        component: {
          props: {
            clearable: true
          },
          placeholder: '请输入项目名称'
        }
      },
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 8,
          placeholder: '请输入项目名称'
        }
      },
      view: { // 查看对话框组件的单独配置
      }
    },
    {
      title: '投资额【亿】',
      key: 'invest',
      sortable: true,
      show: true,
      search: {
        disabled: true,
        component: {
          props: {
            clearable: true
          },
          span: 8,
          placeholder: '请输入投资额【亿】'
        }
      },
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 8,
          placeholder: '请输入投资额【亿】'
        }
      },
    },
    {
      title: '详细地址',
      key: 'address',
      show: true,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 8,
          placeholder: '请输入详细地址'
        }
      },
    },
 
    {
      title: '项目描述',
      key: 'desc',
      search: { disabled: true },
      type: 'text-area'
    },
    {
      title: '公司名称1',
      key: 'compName1',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入公司名称1'
        }
      },
      view: { // 查看对话框组件的单独配置
      }
    },
    {
      title: '业务类型1',
       show: false,
      key: 'cusType1',
      width: 100,
      type: 'select',
      dict: {
        data: vm.dictionary('COMP_BUS_TYPE_CHOICES')
      },
      form: {
        value: 0,
        component: {
          span: 6
        }
      }
    },
    {
      title: '部门1',
      key: 'dept1',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入部门-职位-姓名'
        }
      },
    },
    {
      title: '电话1',
      key: 'phone1',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入电话'
        }
      },
    },
    {
      title: '公司名称2',
      key: 'compName2',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入公司名称2'
        }
      },
      view: { // 查看对话框组件的单独配置
      }
    },
    {
      title: '业务类型2',
       show: false,
      key: 'cusType2',
      width: 100,
      type: 'select',
      dict: {
        data: vm.dictionary('COMP_BUS_TYPE_CHOICES')
      },
      form: {
        value: 0,
        component: {
          span: 6
        }
      }
    },
    {
      title: '部门2',
      key: 'dept2',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入部门-职位-姓名'
        }
      },
    },
    {
      title: '电话2',
      key: 'phone2',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入电话'
        }
      },
    },
    {
      title: '公司名称3',
      key: 'compName3',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入公司名称3'
        }
      },
      view: { // 查看对话框组件的单独配置
      }
    },
    {
      title: '业务类型3',
       show: false,
      key: 'cusType3',
      width: 100,
      type: 'select',
      dict: {
        data: vm.dictionary('COMP_BUS_TYPE_CHOICES')
      },
      form: {
        value: 0,
        component: {
          span: 6
        }
      }
    },
    {
      title: '部门3',
      key: 'dept3',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入部门-职位-姓名'
        }
      },
    },
    {
      title: '电话3',
      key: 'phone3',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入电话'
        }
      },
    },
    {
      title: '公司名称4',
      key: 'compName4',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入公司名称4'
        }
      },
      view: { // 查看对话框组件的单独配置
      }
    },
    {
      title: '业务类型4',
       show: false,
      key: 'cusType4',
      width: 100,
      type: 'select',
      dict: {
        data: vm.dictionary('COMP_BUS_TYPE_CHOICES')
      },
      form: {
        value: 0,
        component: {
          span: 6
        }
      }
    },
    {
      title: '部门4',
      key: 'dept4',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入部门-职位-姓名'
        }
      },
    },
    {
      title: '电话4',
      key: 'phone4',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入电话'
        }
      },
    },
    {
      title: '公司名称5',
      key: 'compName5',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入公司名称5'
        }
      },
      view: { // 查看对话框组件的单独配置
      }
    },
    {
      title: '业务类型5',
       show: false,
      key: 'cusType5',
      width: 100,
      type: 'select',
      dict: {
        data: vm.dictionary('COMP_BUS_TYPE_CHOICES')
      },
      form: {
        value: 0,
        component: {
          span: 6
        }
      }
    },
    {
      title: '部门5',
      key: 'dept5',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入部门-职位-姓名'
        }
      },
    },
    {
      title: '电话5',
      key: 'phone5',
      show: false,
      form: {
        component: {
          props: {
            clearable: true
          },
          span: 6,
          placeholder: '请输入电话'
        }
      },
    },
    
    {
      title: '登记时间',
      key: 'date',
      sortable: true,
      form: {
        component: {
          props: {
            format: 'yyyy-MM-dd',
            valueFormat: 'yyyy-MM-dd'
          }
        }
      },
      type: 'date'
    },
    {
      title: '跟踪进度',
      key: 'progressDesc',
      type: 'editor-quill' ,//字段类型
      show: false,
      form: { component: { name: 'd2p-quill', span: 24 } },
    },
    
  
    ]
  }
}
